package com.ym.medical.domain.param;

import com.ym.common.annotations.CustomConstraint;
import com.ym.common.constant.BeanCovert;
import com.ym.medical.domain.entity.StandarTaglibraryEntity;
import com.ym.medical.enums.TaglibraryTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

import static com.ym.common.constant.ValidRule.Add;
import static com.ym.common.constant.ValidRule.Update;

/**
 * 标准标签库对象 standar_taglibrary
 *
 * @author ym
 * @date 2020-08-20
 */
@ApiModel("标准标签库-修改")
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class StandarTaglibraryUpdateParam extends BeanCovert<StandarTaglibraryEntity> {

	@ApiModelProperty("主键")
	@NotNull(message = "主键不能为空", groups = {Add.class, Update.class})
	private Long id;

	@ApiModelProperty("标签编码")
	@Size(max = 50, message = "标签编码长度超过{max}", groups = {Add.class, Update.class})
	private String tglbNum;

	@ApiModelProperty("标签名称")
	@Size(max = 50, message = "标签名称长度超过{max}", groups = {Add.class, Update.class})
	private String tglbName;

	@ApiModelProperty("标签分类 (01-评价)")
	@Size(max = 2, message = "标签分类 长度超过{max}", groups = {Add.class, Update.class})
	@CustomConstraint(TaglibraryTypeEnum.class)
	private String tglbType;

	@ApiModelProperty("标签等级（01一级评价 02 二级评价 03 三级评价 04 四级评价 05五级评价）")
	@Size(max = 2, message = "标签等级长度超过{max}", groups = {Add.class, Update.class})
	private String tglbLevel;

}
